package com.xuanyuanxinyu.func.workmanager

import android.content.Context

import android.util.Log
import androidx.work.Worker
import androidx.work.WorkerParameters
import androidx.work.rxjava3.RxWorker
import io.reactivex.rxjava3.core.Single
import java.util.concurrent.TimeUnit

class SleepRxWorker(
    context: Context,
    parameters: WorkerParameters
) : RxWorker(context, parameters) {
    
    override fun createWork(): Single<Result> {
        Log.d("1111","RX休眠 1500")
        return Single.just(Result.success()).delay(1500L, TimeUnit.MILLISECONDS)
    }
}

